import React, { Component } from 'react'
import ProductItem from './ProductItem'

export default class ProductList extends Component {
  render() {
    let { list } = this.props;


    return (
      <div className="index">
        <header>
          <h2>商品列表</h2>
        </header>
        <main>


          {
            list.map((item, index) => {
              return <ProductItem key={index} {...this.props} index={index} item={item}></ProductItem>
            })
          }

        </main>

      </div>
    )
  }
}

